#ifndef __USER_TCP_CLIENT_H__
#define __USER_TCP_CLIENT_H__

#include <string.h>
#include <sys/param.h>

#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event_loop.h"
#include "esp_log.h"
#include "nvs_flash.h"

#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include <lwip/netdb.h>

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/event_groups.h"


#define EXAMPLE_WIFI_SSID "jy_office"
#define EXAMPLE_WIFI_PASS "84814000"
#define CONFIG_EXAMPLE_IPV4 1
#define HOST_IP_ADDR  "192.168.0.94"
#define PORT 10018


void initialise_wifi(void);
void wait_for_ip();
int connect_to_server(void);
void cloese_socket(int sock);
int tcp_send_data(int sock,const void *data, size_t size);

#endif

